package com.vcs.frm.web.form.school;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotEmpty;
import org.springframework.format.annotation.NumberFormat;
import org.springframework.format.annotation.NumberFormat.Style;

public class NewAdmissionForm {

	@NotEmpty(message = "First Name can not be empty")
	private String firstName;

	private String middleName;
	private String lastName;

	@NotNull(message = "Please provide student\'s age")
	@NumberFormat(style = Style.NUMBER)
	@Min(1)
	@Max(20)
	private Integer age;

	@NotNull(message = "Please provide Student\'s Gender")
	private String sex;

	@NotNull(message = "Please provide height of student")
	@NumberFormat(style = Style.NUMBER)
	private int height;

	@NotNull(message = "Weight can not be empty")
	@NumberFormat(style = Style.NUMBER)
	@Min(value = 1, message = "Weight Should be between 1 and 150")
	@Max(value = 150, message = "Weight Should be between 1 and 150")
	private int weight;

	@Size(min = 0, max = 5, message = "Blood Group should not be more than 5 characters long")
	private String bloodGroup;

	@NotNull(message = "Please enter Father's First Name")
	@Size(min = 1, max = 150)
	private String fatherFirstName;

	@Size(min = 1, max = 150)
	private String fatherLastName;

	@NotNull(message = "Please enter Mother\'s First Name")
	// @Length(min=10, max= 200, message="Please enter Mother\'s First Name")
	@Size(min = 1, max = 150)
	private String motherFirstName;

	@Size(min = 1, max = 150)
	private String motherLastName;

	@Size(min = 1, max = 150)
	private String guardianFirstName;

	@Size(min = 1, max = 150)
	private String guardianLastName;

	/* Address start */

	@Length(min = 1, max = 200, message = "Should be between 1 to 200 characters")
	@NotNull
	private String addressLineOne;

	private String addressLineTwo;

	private String addressLineThree;

	//@Length(min = 1, max = 200, message = "Should be between 1 to 200 characters")
	//@NotNull
	private int city;

	//@Length(min = 1, max = 200, message = "Should be between 1 to 200 characters")
	//@NotNull
	//private int state;

	@Length(min = 1, max = 200, message = "Should be between 1 to 200 characters")
	@NotNull
	private String country;

	//@Length(min = 6, max = 6, message = "Zipcode should be 6 digit long")
	@NotNull
	@Min(value=111111, message="Zipcode should be 6 digit long")
	@Max(value=999999, message="Zipcode should be 6 digit long")
	private int zipCode;

	/* Address ends */

	@NotNull(message = "Primary Contact Number is required")
	private Long primaryContactNumber;

	private Long alternateContactNumber;

	public NewAdmissionForm() {
		// TODO Auto-generated constructor stub
	}

	public String getFirstName() {
		return firstName;
	}

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	public String getMiddleName() {
		return middleName;
	}

	public void setMiddleName(String middleName) {
		this.middleName = middleName;
	}

	public String getLastName() {
		return lastName;
	}

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	public Integer getAge() {
		return age;
	}

	public void setAge(Integer age) {
		this.age = age;
	}

	public String getSex() {
		return sex;
	}

	public void setSex(String sex) {
		this.sex = sex;
	}

	public int getHeight() {
		return height;
	}

	public void setHeight(int height) {
		this.height = height;
	}

	public int getWeight() {
		return weight;
	}

	public void setWeight(int weight) {
		this.weight = weight;
	}

	public String getBloodGroup() {
		return bloodGroup;
	}

	public void setBloodGroup(String bloodGroup) {
		this.bloodGroup = bloodGroup;
	}

	public String getFatherFirstName() {
		return fatherFirstName;
	}

	public void setFatherFirstName(String fatherFirstName) {
		this.fatherFirstName = fatherFirstName;
	}

	public String getFatherLastName() {
		return fatherLastName;
	}

	public void setFatherLastName(String fatherLastName) {
		this.fatherLastName = fatherLastName;
	}

	public String getMotherFirstName() {
		return motherFirstName;
	}

	public void setMotherFirstName(String motherFirstName) {
		this.motherFirstName = motherFirstName;
	}

	public String getMotherLastName() {
		return motherLastName;
	}

	public void setMotherLastName(String motherLastName) {
		this.motherLastName = motherLastName;
	}

	public String getGuardianFirstName() {
		return guardianFirstName;
	}

	public void setGuardianFirstName(String guardianFirstName) {
		this.guardianFirstName = guardianFirstName;
	}

	public String getGuardianLastName() {
		return guardianLastName;
	}

	public void setGuardianLastName(String guardianLastName) {
		this.guardianLastName = guardianLastName;
	}

	public String getAddressLineOne() {
		return addressLineOne;
	}

	public void setAddressLineOne(String addressLineOne) {
		this.addressLineOne = addressLineOne;
	}

	public String getAddressLineTwo() {
		return addressLineTwo;
	}

	public void setAddressLineTwo(String addressLineTwo) {
		this.addressLineTwo = addressLineTwo;
	}

	public String getAddressLineThree() {
		return addressLineThree;
	}

	public void setAddressLineThree(String addressLineThree) {
		this.addressLineThree = addressLineThree;
	}

	public int getCity() {
		return city;
	}

	public void setCity(int city) {
		this.city = city;
	}

//	public int getState() {
//		return state;
//	}
//
//	public void setState(int state) {
//		this.state = state;
//	}

	public String getCountry() {
		return country;
	}

	public void setCountry(String country) {
		this.country = country;
	}

	public int getZipCode() {
		return zipCode;
	}

	public void setZipCode(int zipCode) {
		this.zipCode = zipCode;
	}

	public Long getPrimaryContactNumber() {
		return primaryContactNumber;
	}

	public void setPrimaryContactNumber(Long primaryContactNumber) {
		this.primaryContactNumber = primaryContactNumber;
	}

	public Long getAlternateContactNumber() {
		return alternateContactNumber;
	}

	public void setAlternateContactNumber(Long alternateContactNumber) {
		this.alternateContactNumber = alternateContactNumber;
	}

	@Override
	public String toString() {
		return "NewAdmissionForm [firstName=" + firstName + ", middleName="
				+ middleName + ", lastName=" + lastName + ", age=" + age
				+ ", sex=" + sex + ", height=" + height + ", weight=" + weight
				+ ", bloodGroup=" + bloodGroup + ", fatherFirstName="
				+ fatherFirstName + ", fatherLastName=" + fatherLastName
				+ ", motherFirstName=" + motherFirstName + ", motherLastName="
				+ motherLastName + ", guardianFirstName=" + guardianFirstName
				+ ", guardianLastName=" + guardianLastName
				+ ", addressLineOne=" + addressLineOne + ", addressLineTwo="
				+ addressLineTwo + ", addressLineThree=" + addressLineThree
				+ ", city=" + city + ", country="
				+ country + ", zipCode=" + zipCode + ", primaryContactNumber="
				+ primaryContactNumber + ", alternateContactNumber="
				+ alternateContactNumber + "]";
	}

}
